/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface EquipmentSelection extends BasicModel<EquipmentSelection> {
  equipmentType?: string; // 设备类型
  equipmentName?: string; // 设备名称
  enterpriseCode?: string; // 企业编码
  enterpriseName?: string; // 企业名称
  isSelected?: string; // 是否勾选（TRUE: 已勾选, FALSE: 未勾选）
}

export const equipmentSelectionList = (params?: EquipmentSelection | any) =>
  defHttp.get<EquipmentSelection>({ url: adminPath + '/unitmanage/equipmentSelection/list', params });

export const equipmentSelectionListData = (params?: EquipmentSelection | any) =>
  defHttp.post<Page<EquipmentSelection>>({ url: adminPath + '/unitmanage/equipmentSelection/listData', params });

export const equipmentSelectionForm = (params?: EquipmentSelection | any) =>
  defHttp.get<EquipmentSelection>({ url: adminPath + '/unitmanage/equipmentSelection/form', params });

export const equipmentSelectionSave = (params?: any, data?: EquipmentSelection | any) =>
  defHttp.post<EquipmentSelection>({ url: adminPath + '/unitmanage/equipmentSelection/save', params, data });

export const equipmentSelectionDelete = (params?: EquipmentSelection | any) =>
  defHttp.get<EquipmentSelection>({ url: adminPath + '/unitmanage/equipmentSelection/delete', params });
